Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

636140 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game

car2.png cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/car2.png
89 Views
0 Comments
Media file
enemycar2.png cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/enemycar2.png
81 Views
0 Comments
Media file
app.js cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/app.js
177 Views
0 Comments

const roadArea = document.querySelector('.road');
let player = { step: 5 };
let keys = { ArrowUp: false, ArrowDown: false, ArrowRight: false, ArrowLeft: false }
let score = 0;
const startBtn = document.querySelector(".btn")
document.addEventListener('keydown', keyDown);
document.addEventListener('keyup', keyUp);
enemycar.jpg cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/enemycar.jpg
87 Views
0 Comments
Media file
car.jpg cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/car.jpg
78 Views
0 Comments
Media file
style.css cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/style.css
112 Views
0 Comments
* {
margin: 0;
padding: 0;
background-color: rgb(118, 189, 159);
}

/* html, body {
height: 100%;
index.html cody/swapnilsparsh/30DaysOfJavaScript/76 - Car Game/index.html
300 Views
0 Comments
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Car Game</title>